<%@ page contentType="text/html;charset=utf-8"%>
<%@ include file="admin_header.jsp"%>
<%@ include file="admin_container.jsp"%>
<div id="content">
<%@ include file="admin_nav.jsp"%>
<div id="right">

<table>
	<tr>
		<th>用户名</th>
		<th>邮件地址</th>
		<th>电话</th>
		<th>省份</th>
		<th>地址</th>
		<th>类型</th>
		<th>注册日期</th>
		<th></th>
		<th></th>
	</tr>
	<tr>
		<td>${account.userName}</td>
		<td>${account.email}</td>
		<td>${account.phone}</td>
		<td>${account.province}</td>
		<td>${account.address}</td>
		<td>${authories[account.type - 1]}</td>		
		<td><fmt:formatDate value="${account.createdDate}" type="date"
			pattern="yyyy-MM-dd hh:mm:ss"></fmt:formatDate></td>
			
		<td><a
			href="<c:url value="/administrator/account.htm"><c:param name="method" value="displayForm"/><c:param name="accountID" value="${account.userID }"/></c:url>">编辑</a></td>
		<td><a
			href="<c:url value="/administrator/account.htm"><c:param name="method" value="delete"/><c:param name="accountID" value="${account.userID }"/></c:url>">删除</a></td>
			
	</tr>
</table>

<h2>所创建课程</h2>

<table>
	<tr>
		<th>课程名</th>
		<th>词库</th>
		<th>小词库单词数</th>
		<th>每轮学习单词数</th>
		<th>创建日期</th>
		<th>最近学习日期</th>
	</tr>
	<c:forEach var="lesson" items="${lessonList}" varStatus="s">
		<tr>
			<td>${lesson.lessonName}</td>
			<td>${lesson.wordLib.wordLibName}</td>
			<td>${lesson.wordsCountOfPerSmallLib }</td>
			<td>${lesson.newWordsCountOfPerTurn}</td>
			<td><fmt:formatDate value="${lesson.createdDate}" type="date"
				pattern="yyyy-MM-dd"></fmt:formatDate></td>
			<td><fmt:formatDate value="${lesson.latestLearnedDate}" type="date"
				pattern="yyyy-MM-dd"></fmt:formatDate></td>
			<td><a
				href="<c:url value="/administrator/lesson.htm"><c:param name="method" value="delete"/><c:param name="lessonID" value="${lesson.lessonID}"/></c:url>">删除</a></td>
		</tr>	
	</c:forEach>
</table>

<h2>生词本</h2>
<table>
	<tr>
		<th>英文单词</th>
		<th>音标</th>
		<th>中文含义</th>
	</tr>
	<c:forEach var="word" items="${wordList}" varStatus="s">
		<tr>
			<td>${word.wordEn }</td>
			<td>${word.phonetics}</td>
			<td>
				<ul>
				<c:forEach var="cs" items="${word.cnAndSentenceList}" varStatus="ss">
					<li>
						<div>${cs.cn }</div>
						<c:if test="${cs.sentence != null}">
						<div>例句: ${cs.sentence }</div>
						</c:if>
					</li>
				</c:forEach>
				</ul>
			</td>
		</tr>	
	</c:forEach>
</table>

</div>
</div>
<%@ include file="admin_footer.jsp"%>